Setting the id argument in getSITE allows
sites to be returned by Sitecode, e.g. for Ballynahone Bog
# Return site using a site ID
sf_bally <- getSITE(ste_type = "SAC", id = "UK0016599", yr = 2025)
sf_bally %>% st_geometry %>% plot(main = sf_bally$SITENAME)Setting the grep_txt argument in getSITE
allows sites to be returned by SiteName either using a RegEx string or name (note strings are
not case sensitive)
#### Filtering by RegEx string (e.g. sites ending in bog)
sf_bog <- getSITE(ste_type = "SSSI",grep_txt = "bog$", yr = 2025)
sf_bog %>% st_drop_geometry() %>% head %>% kable| SITECODE | SITENAME | COUNTRY | Year |
|---|---|---|---|
| 1000052 | Hart Bog | ENGLAND | ALL |
| 1000196 | Askham Bog | ENGLAND | ALL |
| 1000356 | Oakers Bog | ENGLAND | ALL |
| 1000448 | Pow Hill Bog | ENGLAND | ALL |
| 1000568 | Ebblake Bog | ENGLAND | ALL |
| 1000599 | Yanal Bog | ENGLAND | ALL |
#### Filtering by specific site name
sf_bally <- getSITE(ste_type = "SAC",grep_txt = "Ballynahone Bog", yr = 2025)
sf_bally %>% st_drop_geometry() %>% kable| SITECODE | SITENAME | COUNTRY | Year |
|---|---|---|---|
| UK0016599 | Ballynahone Bog | NORTHERN IRELAND | 2025 |
Setting the country argument in getSITE
allows sites to be returned by country
# Return sites by country
sac_4326 <- getSITE(ste_typ = "SAC",country = "Northern Ireland") %>%
st_transform(.,4326)
spa_4326 <- getSITE(ste_typ = "SPA",country = "Northern Ireland") %>%
st_transform(.,4326)
leaflet() %>%
addProviderTiles(providers$Esri.WorldGrayCanvas) %>%
addPolygons(data = sac_4326, color = "red", fillOpacity = 0.3,
weight = 1) %>%
addPolygons(data = spa_4326, color = "blue", fillOpacity = 0.3,
weight = 1) %>%
addLegend(colors = c("red","blue"), labels = c("SAC","SPA"))ggplot and leaflet
plotsThe object sf_uk can be used like any other sf object
e.g.
ggplot and leaflet
plotsThe object sf_uk can be used like any other sf object
e.g.